package com.hellogood.yaohuo.server.serviceImpl;

import java.util.List;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import com.hellogood.yaohuo.server.mgr.factory.MgrFactory;
import com.hellogood.yaohuo.shared.entity.PsThForm;
import com.hellogood.yaohuo.shared.services.PeisongTuihuoService;

public class PeisongTuihuoServiceImpl extends RemoteServiceServlet implements PeisongTuihuoService{

	/**
	 * 
	 */
	private static final long serialVersionUID = -6586081018657013520L;

	@Override
	public List<PsThForm> searchFanchangFormByOrgCodeAndDate(String code, int level, String startDate, String endDate, String rz) {
		return MgrFactory.getInstance().createPeisongTuihuoMgr().searchPsThForm(code, level, startDate, endDate, rz);
	}

	@Override
	public PsThForm getFormDetail(String billNo) {
			return MgrFactory.getInstance().createPeisongTuihuoMgr().getFormDetail(billNo);
	}

	@Override
	public String deleteForm(String billNo) {
		return MgrFactory.getInstance().createPeisongTuihuoMgr().deletePeisongTuihuo(billNo);
	}

	@Override
	public String saveForm(PsThForm form, boolean isModify) {
		return MgrFactory.getInstance().createPeisongTuihuoMgr().createPeisongTuihuoForm(form);
	}

	@Override
	public String bankForm(List<String> bills) {
		return MgrFactory.getInstance().createPeisongTuihuoMgr().rz(bills);
	}

	@Override
	public String getLastPsThBillNo(String orgCode) {
		return MgrFactory.getInstance().createPeisongTuihuoMgr().getLastPsThBillNo(orgCode);
	}


}
